//
//  HWMyVouchersquanTableViewCell.m
//  HWanGame
//
//  Created by 陈道斌 on 2020/11/3.
//  Copyright © 2020 Chendaobin. All rights reserved.
//

#import "HWMyVouchersquanTableViewCell.h"

@implementation HWMyVouchersquanTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    
    
    UIImage * image1 = [UIImage imageNamed:@"baisebeijingjilu"];
    
    UIImage *image2   = [image1 resizableImageWithCapInsets:UIEdgeInsetsMake(image1.size.height*0.9, image1.size.width*0.9, image1.size.height*0.9, image1.size.width*0.9)];
    
    self.beijingimahetupian.image = image2;
    
    
    
    self.zhuantaiBut.layer.cornerRadius = 13;
    self.zhuantaiBut.layer.masksToBounds = YES;
    
    
    self.daijingqunLabel.text = [HWjianzhiduiObject keylocalization:@"代金券"];
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}


-(void)setDataModel:(HWquanObjiect *)dataModel {
    
    
    _dataModel = dataModel ;
    
    
    self.name1Label.text  = [NSString stringWithFormat:@"%@",dataModel.name];
    self.name2Label.text  = [NSString stringWithFormat:@"%@",dataModel.limit];
    self.name3Label.text = [NSString stringWithFormat:@"%@",dataModel.end_time];
    
    [self.zhuantaiBut setTitle:dataModel.status  forState:UIControlStateNormal];
    self.zhuantaiBut.backgroundColor  =[UIColor bm_colorGradientChangeWithSizeView: self.zhuantaiBut];
    
   
    
   NSString *jing =   [NSString stringWithFormat:@"￥%@",dataModel.jian];
    self.jingerLabel.text = jing;
    
    self.jingerLabel.attributedText =  [WMUtil  attributedStringWithText:jing withRangText:dataModel.jian withColor:[UIColor whiteColor] withFont:[UIFont systemFontOfSize:28]];
    
    
    
    
}


-(void)setShujumodel:(HWquanObjiect *)shujumodel {
    
    _shujumodel = shujumodel;
    
    
      self.name1Label.text  = [NSString stringWithFormat:@"%@",shujumodel.name];
      self.name2Label.text  = [NSString stringWithFormat:@"%@",shujumodel.limit];
      self.name3Label.text = [NSString stringWithFormat:@"%@",shujumodel.end_time];
      
      [self.zhuantaiBut setTitle:shujumodel.status  forState:UIControlStateNormal];
    //   self.zhuantaiBut.backgroundColor  =[UIColor bm_colorGradientChangeWithSizeView: self.zhuantaiBut];
      self.zhuantaiBut.backgroundColor = RGB(204, 204, 204);
    
    
      NSString *jing =   [NSString stringWithFormat:@"￥%@",shujumodel.jian];
      self.jingerLabel.text = jing;
      self.jingerLabel.attributedText =  [WMUtil  attributedStringWithText:jing withRangText:shujumodel.jian withColor:[UIColor whiteColor] withFont:[UIFont systemFontOfSize:28]];
      
    
    
    
    
}

@end
